package com.example.toutiao.base;

import android.app.Activity;
import android.view.View;
import android.widget.FrameLayout;

import com.example.toutiao.R;

/**
 * 五个标签页的基类
 * Created by admin on 2017/11/15.
 */

public abstract class BasePager {

    public Activity mActivity;
    public View mRootView;
    public FrameLayout flContent;

    public BasePager(Activity activity){
        mActivity = activity;
        initView();
    }

    /**
     * 初始化布局
     */
    public void initView(){
        mRootView = View.inflate(mActivity, R.layout.base_pager, null);
        flContent = (FrameLayout)mRootView.findViewById(R.id.fl_content);

    }

//    /**
//     * 侧边栏展开或者收起的方法
//     */
//    public void toggle(){
//        MainActivity mainUI = (MainActivity)mActivity;
//        SlidingMenu slidingMenu = mainUI.getSlidingMenu();
//        slidingMenu.toggle();   //开关，如果状态为开，它就关，反之亦然
//}

    /**
     * 初始化数据
     */
    public abstract void initData();

}
